package file;

import java.io.File;
import java.io.FileFilter;

public class ListFilesDemo2 {
    public static void main(String[] args) {
        File dir=new File(".");
        if (dir.isDirectory()){
            FileFilter fileFilter= f -> f.getName().startsWith(".");
            File[] subs=dir.listFiles(fileFilter);
            for (File sub:subs){
                System.out.println(sub.getName());
            }
        }
    }
}
